<?php
/**
 * Created by PhpStorm.
 * User: chengchaogui
 * Date: 2017/8/16
 * Time: 21:52
 */

namespace App\Framework\Enum;


class ExchangeRecordStatusEnum
{
    const WAIT_PROCESS = 1;
    const PROCESSED = 2;
    const SUCCESS = 3;
    const FAIL = 4;
    const SENDED = 5;
    const RECEIVED = 6;

    public static $dataMap = [
        self::WAIT_PROCESS => '待处理',
        self::PROCESSED => '处理中',
        self::SUCCESS => '兑换成功',
        self::FAIL => '兑换失败',
        self::SENDED => '已发货',
        self::RECEIVED => '已收货'
    ];

    public static function getName($key)
    {
        if (array_key_exists($key, self::$dataMap)) {
            return self::$dataMap[$key];
        }

        return '';
    }
}